# print(f"day1:{day1}")

# pts = [70, 58, 54, 49]
# teams = ["Liverpool", "Arsenal", "Nottm Forest", "Chelsea"]
# p1, p2, p3, p4 = pts
# t1, t2, t3, t4 = teams


# pairs = [("Liverpool", 70), ("Arsenal", 58), ("Nottm Forest", 54), ("Chelsea", 49)]

# (t1, p1), (t2, p2), (t3, p3), (t4, p4) = pairs
# i1, i2, i3, i4 = pairs
# print(f"{t1}--- {p1}")
# print(i1, i2)
# # 使用zip
# pairs = zip(teams, pts)
# print(list(pairs))

# (t1, p1), (t2, p2), (t3, p3), (t4, p4) = list(zip(teams, pts))
# i1, i2, i3, i4 = list(zip(teams, pts))

# print(i1)
# print(t1, p1)

# # 写成一个循环
# for t, p in list(zip(teams, pts)):
#     if p > 50:
#         print(f"Team: {t} has {p} points")

# # 使用*
teams = ["Liverpool", "Arsenal", "Nottm Forest", "Chelsea"]
team1, *team2, team3 = teams

print(f"{team1},{team2},{team3}")
# 使用 **
# team_dict = {"Liverpool": 70, "Arsenal": 58, "Nottm Forest": 54, "Chelsea": 49}


def win(*nums):
    print(nums)
    new_pts = [pts + 3 for pts in nums]
    return new_pts


def another_win(**teams):
    print(teams)
    new_teams = {t: p + 3 for t, p in teams.items()}
    return new_teams


print(win(70, 58, 54, 49, 32))
print(another_win(Liverpool=70, Arsenal=58, Nottm_Forest=54, Chelsea=49))


a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print(list(zip(*a)))

for x, y, z in zip(*a):
    print(x, y, z)


def total_points(Liverpool, Arsenal, Nottm_Forest, Chelsea):
    return Liverpool + Arsenal + Nottm_Forest + Chelsea


nums = [70, 58, 54, 49]
pairs = {"Liverpool": 70, "Arsenal": 58, "Nottm_Forest": 54, "Chelsea": 49}

result = total_points(*nums)
print(result)
result = total_points(**pairs)
print(result)


def show(*args, **kwargs):
    print("args", args)
    print("kwargs", kwargs)


show(1, 2, 3, 4, Liverpool=1234)
